<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/dhj/province/Sys_Province.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/dhj/province/Sys_Province.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ProvinceId',
                footer: "Foots",
                cnName: '省份',
                name: 'province/Sys_Province',
                url: "/Sys_Province/",
                sortName: "ProvinceId"
            });
            const editFormFields = ref({"ProvinceCode":"","ProvinceName":"","RegionCode":""});
            const editFormOptions = ref([[{"title":"省份编号","field":"ProvinceCode","type":"text"},
                               {"title":"省份名字","field":"ProvinceName","type":"text"},
                               {"title":"省份位置","field":"RegionCode","type":"text"}]]);
            const searchFormFields = ref({"ProvinceCode":"","ProvinceName":"","RegionCode":""});
            const searchFormOptions = ref([[{"title":"省份编号","field":"ProvinceCode"},{"title":"省份名字","field":"ProvinceName","type":"like"},{"title":"省份位置","field":"RegionCode","type":"like"}]]);
            const columns = ref([{field:'ProvinceId',title:'序号',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProvinceCode',title:'省份编号',type:'string',width:110,align:'left',sort:true},
                       {field:'ProvinceName',title:'省份名字',type:'string',link:true,width:110,align:'left'},
                       {field:'RegionCode',title:'省份位置',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "省份城市",
                table: "Sys_ProvinceCity",
                columns: [{field:'CityName',title:'城市名字',type:'string',width:110,edit:{type:''},align:'left',sort:true},
                       {field:'CitySize',title:'城市大小',type:'string',width:110,edit:{type:''},align:'left'},
                       {field:'CityCode',title:'城市编码',type:'string',width:110,edit:{type:''},align:'left'},
                       {field:'ProvinceId',title:'省份号',type:'int',width:80,hidden:true,align:'left'},
                       {field:'CityId',title:'序号',type:'int',width:80,hidden:true,readonly:true,require:true,align:'left'}],
                sortName: "CityId",
                key: "CityId"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
